﻿package com.sense.canvas {
	
	import flash.events.Event;
	
	public class CanvasEvent extends Event {
	
		public static const CENTERON:String = "centerOn";
		public static const GOTO:String = "goTo";
		public static const GOPAGE:String = "goPage";
	
		public var _goX:Number 
		public var _goY:Number
		public var _goPage:Number
			 
		public function CanvasEvent(type:String, setX:Number, setY:Number, setZ:Number, page:Number = -1){
			_goX = setX
			_goY = setY
			_goZ = setZ // also used for zoom
			_goPage = page
			super(type)
		}
		
		override public function clone():Event {
			return new CanvasEvent(type, _goX, _goY, _goZ, _goPage)
		}
		
		public override function toString():String {
			return formatToString("CanvasEvent", "_goX", "_goY", "_goZ", "_goPage", "bubbles", "cancelable");
		}
	}
}